<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="author" content="zhaozhenguo">
	<title>选择卡片类型名称</title>
	<style>
		.cardTypePhoto{
			padding-top:5px;
			border:1px solid #d0d0d0;
			width:190px;
			height:100px;
			background-color:#FFFFFF;
		}
		.viewTable TD{
			height:20px;
		}
	</style>
	<script language="javascript" src="../script/common.js" type="text/javascript"></script>
	<script language="javascript" type="text/javascript">
	var cardTypeId;
	function load(){
		setPages(["lookview","lookview1","lookview2"]);
		cardTypeId=getPara("cardTypeId");
	   DWR.call("cardTypeService.loadCardType",cardTypeId,false,function(card){
			var baseType = card.cardType.baseCardType;
			var obj = card.cardType;
			obj.targetArea = card.targetAreaName;
			if(baseType==1){
				if(obj.photo){
				}
				if(obj.depositable){
					obj.depositable="是"
				}else{
					obj.depositable="否"
				}
				if(obj.anonymous){
					obj.anonymous="是"
				}else{
					obj.anonymous="否"
				}
				if(obj.canRevcate){
					obj.canRevcate="是"
				}else{
					obj.canRevcate="否"
				}
				if(obj.photo)
			    	$('operPhotoView5').innerHTML = "<img id=picsrc src='" + Common.getPhoto(obj.photo) + "' style='border:1px solid #d0d0d0;' height=100>";
				else
			   		$('operPhotoView5').innerHTML = "";
					
				if(obj.targetArea==null){
					obj.targetArea = "不限制"
				}
				if(obj.restrictCommodities == undefined){
					obj.restrictCommodities = "不限制"
				}else{
					obj.restrictCommodities = CardMgnt.showMerLimitText(obj.restrictCommodities);
				}
				if(obj.userLevel == null){
					obj.userLevel = "不限制"
				}else{
					obj.userLevel=Common.getText("customer_level",obj.userLevel);
				}
				obj.initBalance=Format.fenToYuan(obj.initBalance)
				obj.baseCardType=Common.getText("base_card_type",obj.baseCardType);
				Common.showDetail("lookform",obj);
				switchPage('lookview');		
			}else if(baseType==2){
				if(obj.internal){
					obj.internal="是"
				}else{
					obj.internal="否"
				}
				if(obj.photo)
			    	$('operPhotoView51').innerHTML = "<img id=picsrc src='" + Common.getPhoto(obj.photo) + "' style='border:1px solid #d0d0d0;' height=100>";
				else
			   		$('operPhotoView51').innerHTML = "";
				obj.baseCardType=Common.getText("base_card_type",obj.baseCardType);
				Common.showDetail("lookform1",obj);
				switchPage('lookview1');		
			}else{
				if(obj.photo)
			    	$('operPhotoView52').innerHTML = "<img id=picsrc src='" + Common.getPhoto(obj.photo) + "' style='border:1px solid #d0d0d0;' height=100>";
				else
			   		$('operPhotoView52').innerHTML = "";
				obj.baseCardType=Common.getText("base_card_type",obj.baseCardType);
				Common.showDetail("lookform2",obj);
				switchPage('lookview2');
			}
			
		});
	}
	</script>
</head>
	
<body onload="load()">
	<div id="lookview" style='display:none;'>
		<div class=form style="text-align:center">
			<form id="lookform" name="lookform">
				<div class="formTitle">类型名称详细信息</div>
				<table cellSpacing=0 cellPadding=4 width="100%" border=0 class="viewTable label6 col2">	
					<tr>
						<td><label>类型名称</label> <span id="name"></span></td>
						<td width="130" rowspan="4" align="center" valign="top">
                        	<div id="operPhotoView5" class="cardTypePhoto"></div>
                    	</td>
					</tr>
					<tr>
						<td><label>有效期/天</label> <span id="validityDay"></span></td>		
					</tr>
					<tr>
						<td><label>初始金额</label> <span id="initBalance"></span></td>				
					</tr>
					<tr>
						<td><label>使用区域</label> <span id="targetArea"></span></td>	
					</tr>
					<tr>
						<td><label>是否储值</label> <span id="depositable"></span></td>
						<td><label>是否匿名</label> <span id="anonymous"></span></td>						
					</tr>
					<tr>
						<td><label>基本卡类型</label> <span id="baseCardType"></span></td>		
						<td><label>是否注销</label> <span id="canRevcate"></span></td>
					</tr>
					<tr>
						<td colspan="2"><label>限制商品</label> <span id="restrictCommodities"></span></td>
					</tr>
					<tr>
						<td><label>客户级别</label> <span id="userLevel"></span></td>	
						<td><label>备	  注</label> <span id="description"></span></td>						
					</tr>
				</table>
			</form>
		</div>
	</div>
	<div id="lookview1" style='display:none;'>
		<div class=form>
			<form id="lookform1" name="lookform1">
				<div class="formTitle">类型名称详细信息</div>
				<table cellSpacing=0 cellPadding=4 width="100%" border=0 class="viewTable label5">	
					<tr>
						<td><label>类型名称</label> <span id="name"></span></td>
						<td width="130" rowspan="4" align="center" valign="top">
                        	<div id="operPhotoView51" class="cardTypePhoto"></div>
                    	</td>					
					</tr>
					<tr>
						<td><label>基本卡类型</label> <span id="baseCardType"></span></td>	
					</tr>
					<tr>
						<td><label>有效期/天</label> <span id="validityDay"></span></td>	
					</tr>
					<tr>
						<td><label>是否内部卡</label> <span id="internal"></span></td>		
					</tr>
					<tr>
						<td><label>备	  注</label> <span id="description"></span></td>						
					</tr>
				</table>
			</form>
		</div>
	</div>	
	<div id="lookview2" style='display:none;'>
		<div class=form>
			<form id="lookform2" name="lookform2">
				<div class="formTitle">类型名称详细信息</div>
				<table cellSpacing=0 cellPadding=4 width="100%" border=0 class="viewTable label5">	
					<tr>
						<td><label>类型名称</label> <span id="name"></span></td>
						<td width="130" rowspan="4" align="center" valign="top">
                        	<div id="operPhotoView52" class="cardTypePhoto"></div>
                    	</td>					
					</tr>
					<tr>
						<td><label>基本卡类型</label> <span id="baseCardType"></span></td>	
					</tr>
					<tr>
						<td><label>有效期/天</label> <span id="validityDay"></span></td>	
					</tr>
					<tr>
						<td><label>备	  注</label> <span id="description"></span></td>						
					</tr>
				</table>
			</form>
		</div>
	</div>
</body>
</html>